import OrderFactory from './order'
import TicketFactory from './ticket'
import PayFactory from './pay'
import SupplierFactory from './supplier'
import GoodsFactory from './goods'

const factory = {
  order: OrderFactory,
  ticket: TicketFactory,
  pay: PayFactory,
  supplier: SupplierFactory,
  goods: GoodsFactory
}

export default function (type, time) {
  return new factory[type](type, time)
}